<template>
  <div>
    <img-zoom
      :src="img"
      width="500"
      height="500"
      :bigsrc="img"
      :configs="configs"
    >
    </img-zoom>
  </div>
</template>

<script>
import { getDetailgoods } from "../assets/request";

import imgZoom from "vue2.0-zoom";
export default {
  components: { imgZoom },
  data() {
    return {
      configs: {
        width: 500,
        height: 500,
        maskWidth: 100,
        maskHeight: 100,
        maskColor: "gray",
        maskOpacity: 0.2,
      },
      img: "",
    };
  },
  async created() {
    let res = await getDetailgoods(745);
    console.log(res.s_goods_photos[0].path);
    this.img = res.s_goods_photos[0].path;
  },
};
</script>

<style>
</style>